{% if request.user.username %}
    <span id="login_info">
        Logged in as {{request.user.username}}. <a class="login_button" href="/accounts/logout" alt="Logout">Logout</a>
        <a class="login_button" alt="Account Admin" href="/admin/">Admin</a>
    </span>

{% endif %}
<ul class="top">
    <li>
    <h3>Project</h3>                
    <ul class="ui-helper-hidden">
        <li>
            <a id="new_project" href="/projects/create/">New Project</a>
        </li>
        <li>
            <a id="open_project" href="/projects/open/">Open Project</a>
        </li>
        {% if request.session.project %}
            <li><a href="/projects/show/{{request.session.project.pk}}/">Information</a></li>
            <li><a href="/projects/export/{{request.session.project.pk}}/">Export</a></li>
            <li><a href="/projects/close/">Close</a></li>
        {% else %}
            <li class="disabled_option">Close</li>
        {% endif %}
    </ul>
    </li>
</ul>
{% if request.session.project %}
<ul class="top">
    <li> 
        <h3>Documents</h3>
        <ul class="ui-helper-hidden">
            <li>
                <a id="new_doc" href="/documents/create/">New Document</a>
            </li>
            <li>
                <a id="list_docs" href="/documents/list/">Show Documents</a>
            </li>
        </ul>
    </li> 
</ul>
<ul class="top">
    <li> 
        <h3>Batch</h3>
        <ul class="ui-helper-hidden">
            <li>
                <a id="new_batch" href="/batch/new/">New Batch</a>
            </li>
            <li>
                <a id="latest_batch" href="/batch/latest/">Latest Batch</a>
            </li>
            <li>
                <a id="list_batch" href="/batch/list/">Show Batches</a>
            </li>
            <li>
                <a href="/ocrtasks/">Show Tasks</a>
            </li>
        </ul>
    </li> 
</ul>
{% endif %}
<ul class="top">
    <li>
    <h3>Tools</h3>
        <ul class="ui-helper-hidden">
            <li>
                <a {% ifequal request.path "/presets/builder/" %}class="current"{% endifequal %}
                    href="/presets/builder/">Preset Editor</a>
            </li> 
            <li>
                <a id="list_presets" href="/presets/list/">Presets</a>
            </li>
            <li>
                <a id="list_profiles" href="/profiles/list/">Profiles</a>
            </li>
            <li>
                <a id="list_models" href="/ocrmodels/list/">Models</a>
            </li>
        </ul>
    </li>
</ul>

